#include "stdafx.h"
#include "CImage.h"


CImage::CImage()
{

}
CImage::~CImage()
{

}

void CImage::FromFile(const char_16 * szFile)
{
	m_pImage = GpsImage::FromFile(szFile);
	if(!m_pImage)
		throw CNullPointerException();
	Gdiplus::Status sta = m_pImage->GetLastStatus();
	switch(sta)
	{
	case Gdiplus::Ok:
		m_size.Width = (int_32)m_pImage->GetWidth();
		m_size.Height= (int_32)m_pImage->GetHeight();
		break;
	default:
		break;
	}
}
